package com.boot.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.boot.dao.OrdersDao;
import com.boot.entity.Orders;
import com.boot.entity.Stats;
import com.boot.service.OrdersService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 订单表(Orders)表服务实现类
 *
 * @author makejava
 * @since 2023-07-20 18:48:26
 */
@Service("ordersService")
public class OrdersServiceImpl extends ServiceImpl<OrdersDao, Orders> implements OrdersService {

    @Autowired
    private OrdersDao ordersDao;

    /**
     * 统计消费最高的前十位用户
     * @return
     */
    @Override
    public List<Stats> queryOrdersAndUserSales() {

        List<Stats>list = ordersDao.selectOrdersAndUser();
        return list;
    }
}

